package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-14
 */
public class AccessibilityData implements Sequenceable, Serializable {
    /**
     * Sequenceable
     */
    public static final Sequenceable.Producer<AccessibilityData> CREATOR = new Producer<AccessibilityData>() {
        @Override
        public AccessibilityData createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            AccessibilityData accessibilityData = new AccessibilityData();
            accessibilityData.unmarshalling(parcel);
            return accessibilityData;
        }
    };

    @SerializedName("label")
    private String label;

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.label);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.label = parcel.readString();
        return false;
    }

    @Override
    public String toString() {
        return "AccessibilityData{"
                + "label = '" + label + '\'' + "}";
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }
}
